//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
//
// (C) Copyright 2006 Marvell International Ltd.
// All Rights Reserved
//
//------------------------------------------------------------------------------
//
//  File:  feature.c
//
#include <windows.h>
#include <winnt.h>
#include <oal.h>

//------------------------------------------------------------------------------
//
//  Function:  OALIsProcessorFeaturePresent
//
//  Called to determine the processor's supported feature set.
//
BOOL OALIsProcessorFeaturePresent(DWORD feature)
{
    BOOL rc;

    switch (feature)
    {
    case PF_ARM_V4:
    case PF_ARM_V5:
    case PF_ARM_THUMB:
    case PF_ARM_WRITE_BUFFER:
    case PF_ARM_WRITE_BACK_CACHE:				//assume it's the L1 Cache
    case PF_ARM_CACHE_CAN_BE_LOCKED_DOWN:
#ifdef USING_L2_CACHE
    case PF_ARM_L2CACHE:
    case PF_ARM_L2CACHE_COPROC:
#endif    	
    case PF_ARM_INTEL_XSCALE:
    case PF_ARM_INTEL_PMU:
    case PF_ARM_INTEL_WMMX:
        rc = TRUE;
        break;
    default:
        rc = FALSE;
    }
    return rc;
}

//------------------------------------------------------------------------------

